package com.sen.controller;


import com.sen.common.api.ApiResult;
import com.sen.model.entity.BmsPromotion;
import com.sen.model.entity.BmsTip;
import com.sen.service.BmsPromotionService;
import com.sen.service.BmsTipService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 广告推广表 前端控制器
 * </p>
 *
 * @author ergou
 * @since 2021-04-07
 */
@RestController
@RequestMapping("/promotion")
public class BmsPromotionController extends BaseController{

    @Resource
    private BmsPromotionService bmsPromotionService;

    /**
     * 显示所有广告推广
     * @return BmsTip
     */
    @GetMapping("/list")
    public ApiResult<List<BmsPromotion>> list(){
        List<BmsPromotion> list = bmsPromotionService.list();

        return ApiResult.success(list);
    }
}
